<?php

/**
 * This is the model class for table "jumlahpenumpangciawi".
 *
 * The followings are the available columns in table 'jumlahpenumpangciawi':
 * @property integer $jp_id
 * @property string $jp_bulan
 * @property integer $jp_penumpang_jumlah
 * @property integer $jp_penumpang_karcis
 * @property integer $jp_bagasi_berat
 * @property integer $jP_bagasi_ongkos
 * @property integer $jp_tahun
 */
class Jumlahpenumpangciawi extends CActiveRecord
{
	/**
	 * Returns the static model of the specified AR class.
	 * @return Jumlahpenumpangciawi the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'jumlahpenumpangciawi';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('jp_penumpang_jumlah, jp_penumpang_karcis, jp_bagasi_berat, jP_bagasi_ongkos, jp_tahun', 'numerical', 'integerOnly'=>true),
			array('jp_bulan', 'length', 'max'=>45),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('jp_id, jp_bulan, jp_penumpang_jumlah, jp_penumpang_karcis, jp_bagasi_berat, jP_bagasi_ongkos, jp_tahun', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'jp_id' => 'Jp',
			'jp_bulan' => 'Jp Bulan',
			'jp_penumpang_jumlah' => 'Jp Penumpang Jumlah',
			'jp_penumpang_karcis' => 'Jp Penumpang Karcis',
			'jp_bagasi_berat' => 'Jp Bagasi Berat',
			'jP_bagasi_ongkos' => 'J P Bagasi Ongkos',
			'jp_tahun' => 'Jp Tahun',
		);
	}

	/**
	 * Retrieves a list of models based on the current search/filter conditions.
	 * @return CActiveDataProvider the data provider that can return the models based on the search/filter conditions.
	 */
	public function search()
	{
		// Warning: Please modify the following code to remove attributes that
		// should not be searched.

		$criteria=new CDbCriteria;

		$criteria->compare('jp_id',$this->jp_id);
		$criteria->compare('jp_bulan',$this->jp_bulan,true);
		$criteria->compare('jp_penumpang_jumlah',$this->jp_penumpang_jumlah);
		$criteria->compare('jp_penumpang_karcis',$this->jp_penumpang_karcis);
		$criteria->compare('jp_bagasi_berat',$this->jp_bagasi_berat);
		$criteria->compare('jP_bagasi_ongkos',$this->jP_bagasi_ongkos);
		$criteria->compare('jp_tahun',$this->jp_tahun);

		return new CActiveDataProvider($this, array(
			'criteria'=>$criteria,
		));
	}
}